/**
 * @param {number[]} cost
 * @return {number}
 */
var minCostClimbingStairs = function(cost) {
    // 第i阶最低的费用
    let dp = [0,0]
    for(let i = 2;i<=cost.length;i++){
        dp[i] = Math.min(cost[i-1] + dp[i-1],cost[i-2] + dp[i-2])
    }
    return dp[dp.length-1]
};